#include <config.h>
#include <debug.h>
#include <header.h>
#include <rules.h>
#include <xml_util.h>

#include "gui.h"
#include "language.h"
GtkWidget *get_advance_page(void)
{
  GtkWidget *vbox = NULL;
  GtkWidget *frame_icmp = NULL;
  GtkWidget *frame_log = NULL;
  GtkWidget *frame_restore = NULL;
  GtkWidget *hbox_icmp = NULL;
  GtkWidget *label_icmp = NULL;
  GtkWidget *button_icmp = NULL;
  GtkWidget *hbox_log = NULL;
  GtkWidget *label_log = NULL;
  GtkWidget *button_log = NULL;
  GtkWidget *hbox_restore = NULL;
  GtkWidget *label_restore = NULL;
  GtkWidget *button_restore = NULL;

  vbox = gtk_vbox_new(TRUE, 0);

  frame_icmp = gtk_frame_new(TEXT_FRAME_ICMP);
  gtk_box_pack_start(GTK_BOX(vbox), frame_icmp, FALSE, FALSE, 5);

  frame_log = gtk_frame_new(TEXT_FRAME_LOG);
  gtk_box_pack_start(GTK_BOX(vbox), frame_log, FALSE, FALSE, 5);

  frame_restore = gtk_frame_new(TEXT_FRAME_RESTORE);
  gtk_box_pack_start(GTK_BOX(vbox), frame_restore, FALSE, FALSE, 5);

  hbox_icmp = gtk_hbox_new(FALSE, 0);
  gtk_container_border_width(GTK_CONTAINER(hbox_icmp), 0);
  gtk_container_add(GTK_CONTAINER(frame_icmp), hbox_icmp);
  label_icmp = gtk_label_new(TEXT_LABEL_ICMP);
  button_icmp = gtk_button_new_with_label(TEXT_BUTTON_SETTING);
  gtk_box_pack_start(GTK_BOX(hbox_icmp), label_icmp, FALSE, FALSE, 10);
  gtk_box_pack_end(GTK_BOX(hbox_icmp), button_icmp, FALSE, FALSE, 50);

  hbox_log = gtk_hbox_new(FALSE, 0);
  gtk_container_border_width(GTK_CONTAINER(hbox_log), 0);
  gtk_container_add(GTK_CONTAINER(frame_log), hbox_log);
  label_log = gtk_label_new(TEXT_LABEL_LOG);
  button_log = gtk_button_new_with_label(TEXT_BUTTON_SETTING);
  gtk_box_pack_start(GTK_BOX(hbox_log), label_log, FALSE, FALSE, 10);
  gtk_box_pack_end(GTK_BOX(hbox_log), button_log, FALSE, FALSE, 50);

  hbox_restore = gtk_hbox_new(FALSE, 0);
  gtk_container_border_width(GTK_CONTAINER(hbox_restore), 0);
  gtk_container_add(GTK_CONTAINER(frame_restore), hbox_restore);
  label_restore = gtk_label_new(TEXT_LABEL_RESTORE);
  button_restore = gtk_button_new_with_label(TEXT_BUTTON_SETTING);
  gtk_box_pack_start(GTK_BOX(hbox_restore), label_restore, FALSE, FALSE, 10);
  gtk_box_pack_end(GTK_BOX(hbox_restore), button_restore, FALSE, FALSE, 50);

  /*connect signal*/
  gtk_signal_connect(GTK_OBJECT(button_icmp), "clicked",
                     G_CALLBACK(show_icmp_dialog), NULL);

  return vbox;
}
